﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminMasterPage.master" Inherits="System.Web.Mvc.ViewPage<SHDQGSWEB.Models.Gadget>" %>
<%@ Import Namespace="Obout.Mvc.ComboBox" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Create</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            <!-- Name -->
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Name) %>
            </div>

            <div class="editor-field">
                请选择一种种类
                <%= Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            <!-- Type -->
            <div class="editor-label">
            <% Html.Obout(new ComboBox("TypeCombobox")
                {
                    Width = 200,
                    Height = 200,
                    Mode = ComboBoxMode.ComboBox,
                    SelectionMode = ComboBoxSelectionMode.Single,
                    EmptyText = "选择类别"
                }); %>
               <%= Html.ValidationMessageFor(model => model.Type) %>
            </div>
            <!-- Controller -->
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Controller) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Controller) %>
                <%= Html.ValidationMessageFor(model => model.Controller) %>
            </div>
            <!-- Action -->
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Action) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Action) %>
                <%= Html.ValidationMessageFor(model => model.Action) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ImagePath) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.ImagePath) %>
                <%= Html.ValidationMessageFor(model => model.ImagePath) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Title) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Title) %>
                <%= Html.ValidationMessageFor(model => model.Title) %>
            </div>
            
            
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TextContent) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TextContent) %>
                <%= Html.ValidationMessageFor(model => model.TextContent) %>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

